package com.niguang.govt.admin.api.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * app登录用户信息
 * </p>
 *
 * @author 12380
 * @since 2018-12-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("work_app_user")
public class AppUser extends Model<AppUser> {

    public static final String ID = "id";
    public static final String USER_PHONE = "user_phone";
    public static final String USER_NAME = "user_name";
    public static final String USER_SEX = "user_sex";
    public static final String USER_PIC = "user_pic";
    public static final String USER_CREDIT = "user_credit";
    public static final String CITY_ID = "city_id";
    public static final String USER_TYPE = "user_type";
    public static final String CREATE_TIME = "create_time";
    public static final String DEL_FLAG = "del_flag";
    public static final String CITY_LATITUDE = "city_latitude";
    public static final String IC_CARD = "ic_card";
    public static final String FACE_ID = "face_id";
    public static final String UPDATE_TIME = "update_time";
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    private Long id;
    /**
     * 手机号码
     */
    private String userPhone;
    /**
     * 用户姓名
     */
    private String userName;
    /**
     * 用户性别
     */
    private String userSex;
    /**
     * 用户头像
     */
    private String userPic;
    /**
     * 信誉分
     */
    private Integer userCredit;
    /**
     * 城市ID
     */
    private String cityId;
    /**
     * 用户类型 1--个人 2--企业
     */
    private Integer userType;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 删除标识0-未删除 1-已删除
     */
    @TableLogic
    private Integer delFlag;
    /**
     * 用户注册时所在城市的经纬度
     */
    private String cityLatitude;
    /**
     * IC卡号
     */
    private String icCard;
    /**
     * 百度人脸注册id
     */
    private String faceId;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
